<?php
/*
 * Author :pandiam
 */
require_once ('include/css_head.php');
require_once ('include/functions.php');
require_once ('include/header.php');

require_once ('../BL/BL.php');
require_once('../BL/BL.php');


$catid = $_GET['id'];

?>
<div id="profileSideBar" style="min-width: 260px; margin-right: 50px; float:left"></div>
<?php
echo '<div style="margin-left: 30%;">';
echo '<h2>Select entity to edit</h2>';
echo '  <table class="blockBlue" width="50%">';
$enti = BL_getEntitiesFromCategory($catid);
if($enti!=null){
    foreach($enti as $ent){
?>
        <tr>
               <td class='tC'> <?php echo $ent[1] ?> </td>
               <td class='tC'><a href="editEntity.php?id=<?php echo $catid ?>&ent=<?php echo $ent[0] ?> "> Edit </a> </td>
        </tr>
<?php
    }
echo '</table>';
echo '</div>';
}
?>

<script type="text/javascript">
        $.ajaxSetup ({ cache: false });
        var ajax_load = "<img src='images/load.gif' alt='loading...' />";
        $("#profileSideBar").load($("#profileSideBar").html(ajax_load).load('profileSideBar.php'));
</script>